Working with Email and Letter Templates

In CMPClosed Converged Monetisation Platform. The MDS Global product that supports customer care and billing for digital service providers., external templates determine the format and style of customerClosed In the context of the Cloud Monetisation Platform, an individual or organisation who has signed an agreement to take goods and services from a service provider. A customer receives a bill associated with one or more subscriptions, and can be a single end user or a large company with many subscriptions assigned to one agreement. correspondence.

ClosedSoftware

The template solution is based on Apache Velocity 2.2. Templates are created using Velocity Templating Language (VTL). Velocity supports creating correspondence templates in HTML, RTF and TXT format. Prince is the application used to convert the merged templates into PDF format.

Templates can contain static text, dynamic content (merge fields), images, logos, a header, and a footer.

ClosedStorage

Templates are stored in a default location so that CMP can access the templates: /var/mdsglobal/sabre-server/templates. The default location for images to be included in the templates is /var/mdsglobal/sabre-server/templates/img.

If customers want to store templates in another location, CMP must be configured with the new location. Once correspondence is processed, a dedicated daemonClosed A computer program that runs as a background process, rather than being under the control of an interactive user. stores the generated letters and emails in long-term storage so that they can be viewed in AgentViewClosed The graphical user interface of the CMP that is typically used by Customer Service Agents to access CMP customer and billing data. In versions prior to CMP 8.0, this was called the CMP GUI.. For more information, see Comms Process Flow: Store Letters and Emails.

ClosedTemplate UserClosed A person with the capability to log in to the CMP GUI software, such as a customer service advisor or agent. Guides

The Velocity user guide is available here: http://velocity.apache.org/engine/devel/user-guide.html

Documentation for Prince is available here: https://www.princexml.com/doc/

ClosedNaming Convention for Templates

Templates must be named according to the naming convention <COMMSCODE>-<LANGUAGE>-<DELIVERYMETHOD>-<Format>.vm for example LETT1-EN-LETTER-pdf.vm or MAIL1-EN-EMAIL-html.vm., where <LANGUAGE> can be:

  • EN = English
  • SP = Spanish

ClosedAdding Default Fields and Objects to Templates

Adding Default Fields

To add customer data from a default field to a template, add a leading dollar symbol ($) to the fieldDataMap reference, then in square brackets - [ ] - supply the default field name, enclosed in single quotes:

$fieldDataMap['<default field>']

For example, the following adds accountClosed In the Cloud Monetisation Platform, a billing entity that can be used to manage payments on one or more subscriptions or payments for services. An account can hold details such as payments or invoices. balance information to a communication:

<br/>
Total Balance: $fieldDataMap['ACCOUNTBALANCE']<br/>
Total Amount Due: $fieldDataMap['ACCOUNTAMOUNTDUE']<br/>
Total Amount In Query: $fieldDataMap['ACCOUNTAMOUNTINQUERY']<br/>
Total Amount In Arrears: $fieldDataMap['ACCOUNTAMOUNTINARREARS']<br/>
<br/>

For a full list of CMP default fields, see the Appendix A: CMP Default Fields and Beans.

Adding Objects

Objects such as images, logos, headers, and footers must be stored within the same file-sharing system as the template. Templates reference these objects in order to include them in emails and letters.

Reference an image using imageStoreMap by providing the filename of the referenced image enclosed in single quotes in square brackets as follows:

<img alt="mds_logo.png" src="data:image/png;base64,$imageStoreMap['mds_logo.png']" style="width:304px;height:228px;"/>

Adding External References

You can use externally available objects by referring to a standard URL, for example:

<img src="http://www.mdscem.com/sites/default/files/2016-06/Retail-VNOClosed Virtual Network Operator. See MVNO or Mobile Virtual Network Operator.-Image-Banner.png">

Formatting Dates for Emails and Letters

You can specify the format for dates in emails and letters by using Velocity's DateTool. For example, the following template extract maps to the RESOLUTIONREQUIREDBYDATE default field and uses date.format to specify how the date data stored in that default field should display:

Hi $fieldDataMap['YOURBILL'] <BR>

<br>

Raw date is $fieldDataMap['RESOLUTIONREQUIREDBYDATE']

Formatted date is ${date.format('yyyy-M-d', $fieldDataMap['RESOLUTIONREQUIREDBYDATE'])} <br>

Long formatted date is ${date.format('long', $fieldDataMap['RESOLUTIONREQUIREDBYDATE'])} <br>

This is the result:

For possible formatting options, click here.